//
//
//
#ifndef __ROCKETPORTOCOLLOGIN_H
#define __ROCKETPORTOCOLLOGIN_H

#include "RocketRequest.h"
#include "RocketResponse.h"
#include "RocketCommon.h"

class CRocketRequestLogin : public CRocketRequest
{
public:
	CRocketRequestLogin(MNetworkEventObervser* aObserver);
	~CRocketRequestLogin();
	
	TBool	Encode();
	void 	SetInfo(const TDesC& aName, const TDesC& aPassword, const TDesC& aToken, const TDesC& aVersion);
	
private:
	TBuf<20>	iUserName;
	TBuf<20>	iPassword;
	TBuf<20>	iToken;
	TBuf<20>	iVersion;
};

class CRocketResponseLogin : public CRocketResponse
{
public:
	CRocketResponseLogin();
	~CRocketResponseLogin();
	
public:
	void OnStartElementL(const Xml::RTagInfo& aElement,
								const Xml::RAttributeArray& aAttributes,
								TInt aErrorCode);
	
	void OnEndElementL(const Xml::RTagInfo &aElement, 
										TInt aErrorCode);
	
private:
	TLoginInfo	iLogInfo;
};

#endif
